/*
写法一： */
import Vue from "vue";

const template = {
  CompHeaderAsync: () => {
    return import("@/views/internation/index");
  }
};
export default function() {
  let i;
  for (i = 1; i <= 3; i++) {
    let classname = i < 3 ? true : false;
    Vue.component("tb-heading" + i, {
      render: function(createElement) {
        return createElement(
          "div",
          {
            class: {
              bgColor: true
            }
          },
          [
            createElement(template.CompHeaderAsync, {
              class: {
                fontColor: classname
              }
            })
          ]
        );
      }
    });
  }
}

// 写法二
/* const template = {
  CompHeaderAsync: () => {
    return import("@/views/internation/index");
  }
};

export default {
  render(createElement) {
    return createElement(
      "div",
      {
        class: {
          bgColor: true
        }
      },
      [createElement(template.CompHeaderAsync)]
    );
  }
}; */
